package com.ztesoft.iom.adapter.server.result;

/**
 * Created by kangkang on 2018/4/9.
 */
public class IomResultCodes {

    private Integer code;
    private String message;

    public IomResultCodes(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    public static IomResultCodes success(){
        return new IomResultCodes(SUCCESS,SUCCESS_MSG);
    }

    public static IomResultCodes parameterError(){
        return new IomResultCodes(PARAMETER_ERROR,PARAMETER_ERROR_MSG);
    }

    /**
     * 成功
     */
    private static Integer SUCCESS = 200;
    private static String SUCCESS_MSG = "success";


    /**
     * 参数错误
     */
    private static Integer PARAMETER_ERROR = 460;
    private static String PARAMETER_ERROR_MSG = "parameter error.";

}
